# -*- coding:utf-8 -*-
# author:qiong   time:2021/9/17
from selenium.webdriver.support.wait import WebDriverWait

from mkzAPP_test.utils_app import UntilsDriver


# 显示等待方式获取元素基类
class basePageElement:

    def __init__(self):
        self.driver = UntilsDriver.get_app_driver()

    def wait_getelement(self,location):
        element = WebDriverWait(self.driver,20,0.5).until(lambda x:x.find_element(*location))
        return element

# 操作层基类
class baseHandle:
    # 输入框清除再输入
    def input_text(self, element, text):
        element.clear()
        element.send_keys(text)